﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Gps_TaskInfo数据模型对象
    /// </summary>
    [Serializable]
    public partial class Gps_TaskInfoMod
    {
        /// <summary>
        /// 初始化Gps_TaskInfo数据模型对象
        /// </summary>
        public Gps_TaskInfoMod()
        {
            
        }
        /// <summary>
        /// 初始化Gps_TaskInfo数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="taskID">TaskID</param>
        /// <param name="state">State</param>
        /// <param name="createTime">CreateTime</param>
        public Gps_TaskInfoMod(long taskID,int state,DateTime createTime)
        {
            //给TaskID字段赋值
            this.TaskID = taskID;
            //给State字段赋值
            this.State = state;
            //给CreateTime字段赋值
            this.CreateTime = createTime;
        }
        /// <summary>
        /// 初始化Gps_TaskInfo数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="taskID">TaskID</param>
        /// <param name="cmd">Cmd</param>
        /// <param name="paras">Paras</param>
        /// <param name="state">State</param>
        /// <param name="createTime">CreateTime</param>
        /// <param name="userID">UserID</param>
        /// <param name="taskType">TaskType</param>
        /// <param name="remark">Remark</param>
        /// <param name="tID">tID</param>
        public Gps_TaskInfoMod(long taskID,string cmd,string paras,int state,DateTime createTime,string userID,int? taskType,string remark,string tID)
        {
            //给TaskID字段赋值
            this.TaskID = taskID;
            //给Cmd字段赋值
            this.Cmd = cmd;
            //给Paras字段赋值
            this.Paras = paras;
            //给State字段赋值
            this.State = state;
            //给CreateTime字段赋值
            this.CreateTime = createTime;
            //给UserID字段赋值
            this.UserID = userID;
            //给TaskType字段赋值
            this.TaskType = taskType;
            //给Remark字段赋值
            this.Remark = remark;
            //给tID字段赋值
            this.TID = tID;
        }
        
		//属性存储数据的变量
        private long _taskID;
        private string _cmd;
        private string _paras;
        private int _state;
        private DateTime _createTime;
        private string _userID;
        private int? _taskType;
        private string _remark;
        private string _tID;
        
        /// <summary>
        /// TaskID
        /// </summary>
        public long TaskID
        {
            get { return this._taskID; }
            set { this._taskID = value; }
        }
        /// <summary>
        /// Cmd
        /// </summary>
        public string Cmd
        {
            get { return this._cmd; }
            set { this._cmd = value; }
        }
        /// <summary>
        /// Paras
        /// </summary>
        public string Paras
        {
            get { return this._paras; }
            set { this._paras = value; }
        }
        /// <summary>
        /// State
        /// </summary>
        public int State
        {
            get { return this._state; }
            set { this._state = value; }
        }
        /// <summary>
        /// CreateTime
        /// </summary>
        public DateTime CreateTime
        {
            get { return this._createTime; }
            set { this._createTime = value; }
        }
        /// <summary>
        /// UserID
        /// </summary>
        public string UserID
        {
            get { return this._userID; }
            set { this._userID = value; }
        }
        /// <summary>
        /// TaskType
        /// </summary>
        public int? TaskType
        {
            get { return this._taskType; }
            set { this._taskType = value; }
        }
        /// <summary>
        /// Remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        /// <summary>
        /// tID
        /// </summary>
        public string TID
        {
            get { return this._tID; }
            set { this._tID = value; }
        }
        
        /// <summary>
        /// 对比两个Gps_TaskInfo数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Gps_TaskInfo数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Gps_TaskInfo数据模型对象
            Gps_TaskInfoMod gps_TaskInfoMod = obj as Gps_TaskInfoMod;
            //判断是否转换成功
            if (gps_TaskInfoMod == null) return false;
            //进行匹配属性的值
            return
                //判断TaskID是否一致
                this.TaskID == gps_TaskInfoMod.TaskID &&
                //判断Cmd是否一致
                this.Cmd == gps_TaskInfoMod.Cmd &&
                //判断Paras是否一致
                this.Paras == gps_TaskInfoMod.Paras &&
                //判断State是否一致
                this.State == gps_TaskInfoMod.State &&
                //判断CreateTime是否一致
                this.CreateTime == gps_TaskInfoMod.CreateTime &&
                //判断UserID是否一致
                this.UserID == gps_TaskInfoMod.UserID &&
                //判断TaskType是否一致
                this.TaskType == gps_TaskInfoMod.TaskType &&
                //判断Remark是否一致
                this.Remark == gps_TaskInfoMod.Remark &&
                //判断tID是否一致
                this.TID == gps_TaskInfoMod.TID;
        }
        /// <summary>
        /// 将当前Gps_TaskInfo数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Gps_TaskInfo数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将TaskID进行按位异或运算处理
                this.TaskID.GetHashCode() ^
                //将Cmd进行按位异或运算处理
                (this.Cmd == null ? 2147483647 : this.Cmd.GetHashCode()) ^
                //将Paras进行按位异或运算处理
                (this.Paras == null ? 2147483647 : this.Paras.GetHashCode()) ^
                //将State进行按位异或运算处理
                this.State.GetHashCode() ^
                //将CreateTime进行按位异或运算处理
                this.CreateTime.GetHashCode() ^
                //将UserID进行按位异或运算处理
                (this.UserID == null ? 2147483647 : this.UserID.GetHashCode()) ^
                //将TaskType进行按位异或运算处理
                (this.TaskType == null ? 2147483647 : this.TaskType.GetHashCode()) ^
                //将Remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode()) ^
                //将tID进行按位异或运算处理
                (this.TID == null ? 2147483647 : this.TID.GetHashCode());
        }
        /// <summary>
        /// 将当前Gps_TaskInfo数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Gps_TaskInfo数据模型对象转换成字符串副本
            return
                "[" +
                //将TaskID转换成字符串
                this.TaskID + "," +
                //将State转换成字符串
                this.State + "," +
                //将CreateTime转换成字符串
                this.CreateTime +
                "]";
        }
    }
}
